<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core">

    <p:panel header="ASIGNACIÓN DE ASESOR" style="border: none;">
        <div align="center">
            <h:form style="border-style: solid; border-color: #069; font-weight: bold; width: 99%"
                    id="formIdAdviser">
                <p><h:outputText value="ASIGNAR UN ASESOR" style="font-weight: bold; font-size: 18px; color:#069;"/></p>
                <h:panelGrid columns="2" cellspacing="5" id="panelGridIDdd">
                    <p:outputLabel value="Docente: "/>
                    <h:panelGrid columns="2">
                        <p:selectOneMenu value="#{practiceProcessBean.subNameTeacher}">
                            <f:selectItem itemLabel="Ing." itemValue="Ing."/>
                            <f:selectItem itemLabel="Lic." itemValue="Lic."/>
                            <f:selectItem itemLabel="Msc." itemValue="Msc."/>
                            <f:selectItem itemLabel="Dr." itemValue="Dr."/>
                            <f:selectItem itemLabel="Ph." itemValue="Ph."/>
                        </p:selectOneMenu>

                        <p:selectOneMenu value="#{practiceProcessBean.adviserPractice.nameAdviser}" required="true"
                                         panelStyle="width: 290px;" effect="fade" style="width:300px"  
                                         filter="true" filterMatchMode="startsWith">

                            <f:selectItem itemValue="" itemLabel="Seleccione un dccente"/>
                            <f:selectItems value="#{practiceProcessBean.listTeacher}" var="teacher"
                                           itemValue="#{teacher}" itemLabel="#{teacher}"/>

                        </p:selectOneMenu>
                    </h:panelGrid>
                    
                    <p:outputLabel value="Fecha de asignación: "/>
                    <p:calendar locale="es" value="#{practiceProcessBean.adviserPractice.dateAssignment}" required="true" label="Día" title="Día de Asignación"/>

                    <p:outputLabel value="Documento formal:  "/>
                    <p:inputMask value="#{practiceProcessBean.adviserPractice.documentFormal}" size="40"
                                 mask="OFICIO Nº 999-9999 CPPP-FIIS-UNAS" label="Document" title="Documento Formal"/>

                    <p:outputLabel value="Nombre Decano: "/>
                    <p:inputText value="#{practiceProcessBean.nombreDecano}" size="40" required="true" title="Nombre Decano"/>

                    <p:separator/>
                    <p:separator/>
                    <p:commandButton value="Guargar" title="Si desea ver el reporte debe ir al detalle del alumno."
                                     action="#{practiceBean.initCollection}" update=":panelCenter"
                                     onstart="PF('blockUI').block();" oncomplete="PF('blockUI').unblock();">
                        <f:actionListener binding="#{practiceProcessBean.saveAdviserPractice()}" />
                        <f:setPropertyActionListener value="./content/practice.xhtml" target="#{indexLoginBean.navigation}"/>
                    </p:commandButton>
                    <p:commandButton value="Cancelar" update=":panelCenter" action="#{practiceBean.initCollection}"
                                     onstart="PF('blockUI').block();" oncomplete="PF('blockUI').unblock();">
                        <f:setPropertyActionListener value="./content/practice.xhtml" target="#{indexLoginBean.navigation}"/>
                    </p:commandButton>

                </h:panelGrid>
            </h:form>
        </div>
    </p:panel>


</ui:composition>
